package cn.admin.remoting.impl;

import cn.admin.remoting.Client;
import cn.admin.remoting.ClientManager;
import cn.admin.remoting.RemotingException;

class FailedClientFuture implements ClientManager.ClientFuture {

    String url;
    RemotingException re;

    FailedClientFuture(String url,RemotingException re) {
        this.url = url;
        this.re = re;
    }

    @Override
    public String targetUrl() {
        return this.url;
    }

    @Override
    public void cancel() {

    }

    @Override
    public boolean isDone() {
        return false;
    }

    @Override
    public boolean isConnected() {
        return false;
    }

    @Override
    public boolean isCancelled() {
        return false;
    }

    @Override
    public Client get(long timeoutMs) throws RemotingException {
        throw this.re;
    }
}
